package work3_13;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Test4 {
    /**
     * 4.创建Student类，属性包括id[1-40],scroe[0-100], 所有属性随机生成。
     * 创建集合，保存20个对象，找到分数最高与最低的学生，
     * 分别用list和set集合实现。
     */
    Random ra=new Random();
    private int id=ra.nextInt(40)+1;
    private double score= ra.nextDouble(101);

    public Test4() {}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

//    public Test4(int id, double score) {
//        this.id = id;
//        this.score = score;
//    }

    public static void main(String[] args) {
        Test4 t4=new Test4();
        List list1=new ArrayList<>();
        for (int i = 0; i < list1.size(); i++) {
            System.out.println(list1.get(i)+"   ");
        }
    }

}

